package cn.tedu.io.print;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;

public class PrintStreamDemo {
    public static void main(String[] args) throws IOException {
        //创建打印流对象
        PrintStream ps=new PrintStream("D:\\6.txt");

        //打印--写出数据
        ps.write("123".getBytes());

        //打印任意类型数据并换行
        ps.println(true);

        //打印任意类型数据
        ps.print("abc");

        //关流
        ps.close();


    }
}
